fix: resolve #639#641
Closed
inference-gateway-maintainer[bot] wants to merge 7 commits into
Closed
Conversation
Discover Agent Skills from the open-standard .agents/skills/<name>/SKILL.md in addition to project .infer/skills/ and user-global ~/.infer/skills/. Precedence is project > agents > user (first match wins on name collision), so a repo that ships skills under the cross-tool .agents/skills/ convention works without moving them into .infer/skills/. - domain: add SkillScopeAgents scope value - config: add AgentsDirName; carve .agents/skills out of the sandbox so SKILL.md and references/*.md read even under a restrictive sandbox (parity with .infer/skills) - skills: insert .agents/skills into searchScopes, between project and user - cmd/skills + docs/skills + docs/directory-structure: document the location Closes #639
Centralized-config changes in one PR: 1. Adds/updates `.github/workflows/infer.yml` as a thin caller of the org reusable workflow `inference-gateway/.github/.github/workflows/infer.yml@v0.11.3`, wiring the `@infer` bot (inference-gateway/infer-action) into this repo. 2. Bumps this repo's Flox `infer` pin (`.flox/env/manifest.toml`) to `v0.121.1` (the latest `inference-gateway/cli` release) and refreshes `.flox/env/manifest.lock`. 3. Regenerates the committed `.infer/` config with `infer init --overwrite --skip-migrations` using that CLI. Setup lives centrally, so future moves (action bump, model, tool scope, CLI version) are a **re-run of `migrate-infer.yml`** instead of a hand-edit per repo. Ran in CI (mirrors `bump-adl.yml`): - sed the `inference-gateway/cli` pin in `.flox/env/manifest.toml` to the latest release - `flox upgrade infer` + `flox activate` to refresh `.flox/env/manifest.lock` - `flox activate -- infer init --overwrite --skip-migrations` to regenerate `.infer/` > **Heads-up:** `infer init --overwrite` resets `.infer/` to CLI defaults. `.infer/agents.yaml` > and `.infer/mcp.yaml` (this repo's A2A agents registry + MCP servers) are **preserved** > byte-for-byte; every other config file (`config.yaml`, `prompts.yaml`, `keybindings.yaml`, > `channels.yaml`, `computer_use.yaml`, `heartbeat.yaml`, `shortcuts/*`) is regenerated. > `.infer/bin`, `logs`, history and the conversations DB stay out via the nested > `.infer/.gitignore`. Review the diff before merging. - Triggers on `@infer` mentions in issues / issue comments. Default model `deepseek/deepseek-v4-flash`. The `infer-action` pin lives in the reusable `infer.yml`. - Also adds a manual `workflow_dispatch` form: from this repo's Actions tab pick **Infer**, type a free-text `prompt`, and the bot works it in that run and opens a PR (no issue needed) - mirroring the `@claude` workflow. - Tools = infer-action's default bash whitelist + the language preset (+ markdownlint where set), configured in `repos.yaml` (the entry's `orchestrators.infer` block). - Requires the maintainer GitHub App (`INFERENCE_GATEWAY_MAINTAINER_APP_ID` / `INFERENCE_GATEWAY_MAINTAINER_APP_PRIVATE_KEY`) installed on this repo plus the provider API-key secrets; both reach the reusable workflow via `secrets: inherit`. Filed by [migrate-infer.yml](https://github.com/inference-gateway/.github/blob/main/.github/workflows/migrate-infer.yml). Co-authored-by: inference-gateway-maintainer[bot] <246577062+inference-gateway-maintainer[bot]@users.noreply.github.com>
…actoring (#637) Extends `/explorer` so you can browse a file, select a line range, optionally annotate it, and pull those lines into chat as **attached context** — part of making the CLI usable without reaching for a separate IDE. Selected snippets appear as a tree of file + line ranges below the chat input and are sent (selected lines only) with your next message. Closes #599. In `/explorer`, with a file previewed: - `s` — enter line-select mode - `↑/↓` (`j/k`) move the line cursor; `space`/`v` mark a range - **`enter` attaches the selected range immediately** (annotation optional) - `a` — add an optional natural-language note to the range, then `enter` attaches it - `esc` backs out of select mode; `esc`/`q` closes the explorer **carrying** the attachments to chat; `ctrl+c` discards Back in chat, attachments render as a tree (file + line ranges only) below the input. Multiple explorer trips accumulate. Manage them with: - `ctrl+g` — focus the tree - `↑/↓` move · `d` remove one · `c` clear all · `esc` leave On send, the **selected lines** (fenced, headed `path (lines X-Y):`, with the optional `note:`) are appended to your message and the tree clears. Slash/bash commands are not augmented, so attachments persist for the next real message. Empty input + attachments is a valid send. - **`internal/ui/components/file_explorer.go`** — `SnippetSelection` type + select-mode state. `enter` attaches the current range immediately (no required annotation); `a` adds an optional note. `esc`/`q` closes carrying selections, `ctrl+c` discards. `FormatAnnotations()` now emits **only the selected lines** (fenced, with a `path (lines X-Y):` header + optional `note:`) — not the whole file or a context window. - **`internal/ui/components/snippet_attachments_view.go`** *(new)* — `SnippetAttachmentsView`: renders pending attachments as a focusable tree (file parents, line-range children) with cursor/remove/clear and width-aware path truncation. - **`internal/ui/components/application_view.go`** — renders the attachments tree directly below the input, with height accounting so the input isn't pushed off-screen. - **`internal/app/chat.go`** — pending-attachments state; explorer close **carries** selections into chat (instead of dumping a blob into the input box); `ctrl+g` focus shim with nav/remove/clear; `SendMessage` appends the selected-lines block at send time and clears it (skipped for slash/bash commands). - **`config/keybindings.go`** — explorer `select`/`toggle_select`/`annotate`/`submit` actions + `chat.focus_attachments` (`ctrl+g`). - **Tests** — formatter (selected-lines-only), the attachments tree (grouping, cursor→index mapping, clamp), explorer keys (enter-attaches, close-carries), and the send-path gating/concatenation. - **Attached context, not input injection** — snippets land as a reviewable tree of file + line ranges below the input and are sent with the next message, instead of overwriting whatever you'd typed. - **Selected lines only** — exactly the chosen range is sent (no whole-file or context-window dump), keeping token use tight and the model's focus precise. - **Line-based selection** — deterministic and language-agnostic (no tree-sitter dependency). Syntax-tree-node selection remains a future enhancement. - **Optional annotations** — `enter` attaches immediately; `a` adds a per-snippet note when wanted. The tree shows only file + lines. - [x] `/explorer` supports a snippet-selection mode on an open file. - [x] Select a line range, rendered with a distinct gutter style. - [x] Attach an optional natural-language annotation. - [x] Selections stored as `(file, start_line, end_line, annotation)`. - [x] The selected lines (+ annotation) reach the LLM — sent with the next message. - [x] Multiple disjoint selections within one file and across files. - [x] Tests cover selection, attachment, the tree, and the send path. - `golangci-lint run` → 0 issues - `go test ./...` → all pass - `gofmt` / pre-commit hooks → pass None. CLI-internal TUI feature; docs added in-repo under `docs/features/`. ```bash task test go test ./internal/ui/components/... ./internal/app/... ```
Co-authored-by: Eden Reich <eden.reich@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resolves #639
Summary
The agent's original PR description was incomplete, so this summary was generated from the commit history.
Changes
infer agentcommand (feat(agent): Add parallel tool execution support toinfer agentcommand #157)infer initcommand to support AI-generated AGENTS.md with model optioninfer initcommand (feat(init): Add AGENTS.md generation toinfer initcommand #148)map[string]interface{}tomap[string]any